package com.aaa.arouterone.test

import android.util.Log
import javax.inject.Inject

/**
 * @Description:  hilt 学习
 * @Author:  lfc
 * @Email:    iamlifuchang@163.com
 * @CreateTime:     2021/3/30 9:58
 * @UpdateRemark:   hilt 学习
 */
class Truck @Inject constructor(var driver: Drivers) {

    @EngineModule.BindGasEngine
    @Inject
    lateinit var engine: Engine

    @EngineModule.BindElectricEngine
    @Inject
    lateinit var electricEngine: Engine

    fun deliver() {
        electricEngine.start()
        engine.start()
        Log.d("-lfc", "truck  is delivering  cargo.Driven  by $driver")
        engine.shutdown()
        electricEngine.shutdown()
    }
}